home *** CD-ROM | disk | FTP | other *** search
- /* COLUMNS.C
-
- Copyright (c) 1984, Gordon Lee Waite
- 413 W. Pleasant Street
- Maquoketa, IA 52060
-
-
- summary: columns infile outfile [c] [w]
-
- arguments: infile is the input file which will be displayed in
- columns
-
- outfile is the file which will contain the output
-
- c is the optional number of columns into which
- infile will be split.
-
- w is the optional width of the output lines.
- (The value of w must be larger than the value of c!)
-
- Note: If an input line is too big for the output
- column width, the input line is truncated to fit.
-
- Example: columns myfile outfile 3
-
- This command line will read myfile and produce an
- output file named outfile which will contain the
- contents of myfile split into 3 columns. The
- program writes the output sequentially across the
- columns. That is, the program does not produce one
- sorted column then another sorted column.
-
- If myfile contained the following:
-
- one
- two
- three
- four
- five
-
- the output would look like:
-
- one two three
- four five
-
- */
-